// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::WebSecurityScanner].
#[async_trait::async_trait]
pub trait WebSecurityScanner: std::fmt::Debug + Send + Sync {
    async fn create_scan_config(
        &self,
        req: crate::model::CreateScanConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ScanConfig>>;

    async fn delete_scan_config(
        &self,
        req: crate::model::DeleteScanConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn get_scan_config(
        &self,
        req: crate::model::GetScanConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ScanConfig>>;

    async fn list_scan_configs(
        &self,
        req: crate::model::ListScanConfigsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListScanConfigsResponse>>;

    async fn update_scan_config(
        &self,
        req: crate::model::UpdateScanConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ScanConfig>>;

    async fn start_scan_run(
        &self,
        req: crate::model::StartScanRunRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ScanRun>>;

    async fn get_scan_run(
        &self,
        req: crate::model::GetScanRunRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ScanRun>>;

    async fn list_scan_runs(
        &self,
        req: crate::model::ListScanRunsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListScanRunsResponse>>;

    async fn stop_scan_run(
        &self,
        req: crate::model::StopScanRunRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ScanRun>>;

    async fn list_crawled_urls(
        &self,
        req: crate::model::ListCrawledUrlsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListCrawledUrlsResponse>>;

    async fn get_finding(
        &self,
        req: crate::model::GetFindingRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Finding>>;

    async fn list_findings(
        &self,
        req: crate::model::ListFindingsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListFindingsResponse>>;

    async fn list_finding_type_stats(
        &self,
        req: crate::model::ListFindingTypeStatsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListFindingTypeStatsResponse>>;
}

/// All implementations of [super::WebSecurityScanner] also implement [WebSecurityScanner].
#[async_trait::async_trait]
impl<T: super::WebSecurityScanner> WebSecurityScanner for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn create_scan_config(
        &self,
        req: crate::model::CreateScanConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ScanConfig>> {
        T::create_scan_config(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_scan_config(
        &self,
        req: crate::model::DeleteScanConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_scan_config(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_scan_config(
        &self,
        req: crate::model::GetScanConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ScanConfig>> {
        T::get_scan_config(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_scan_configs(
        &self,
        req: crate::model::ListScanConfigsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListScanConfigsResponse>> {
        T::list_scan_configs(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_scan_config(
        &self,
        req: crate::model::UpdateScanConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ScanConfig>> {
        T::update_scan_config(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn start_scan_run(
        &self,
        req: crate::model::StartScanRunRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ScanRun>> {
        T::start_scan_run(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_scan_run(
        &self,
        req: crate::model::GetScanRunRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ScanRun>> {
        T::get_scan_run(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_scan_runs(
        &self,
        req: crate::model::ListScanRunsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListScanRunsResponse>> {
        T::list_scan_runs(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn stop_scan_run(
        &self,
        req: crate::model::StopScanRunRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ScanRun>> {
        T::stop_scan_run(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_crawled_urls(
        &self,
        req: crate::model::ListCrawledUrlsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListCrawledUrlsResponse>> {
        T::list_crawled_urls(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_finding(
        &self,
        req: crate::model::GetFindingRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Finding>> {
        T::get_finding(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_findings(
        &self,
        req: crate::model::ListFindingsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListFindingsResponse>> {
        T::list_findings(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_finding_type_stats(
        &self,
        req: crate::model::ListFindingTypeStatsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListFindingTypeStatsResponse>> {
        T::list_finding_type_stats(self, req, options).await
    }
}
